*,
    *::before,
    *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      --background: #292728;
      --cream: #F9F5EF;
      --charcoal: #1C1C1E;
      --blush: #D4896A;
      --blush-light: #EDD5C8;
      --sage: #7A9E8E;
      --sage-light: #D0E4DC;
      --error: #C0392B;
      --error-light: #FADBD8;
      --muted: #8A8A8E;
      --border: #E5E0D8;
      --shadow: 0 2px 16px rgba(28, 28, 30, 0.07);
      --shadow-lg: 0 8px 40px rgba(28, 28, 30, 0.12);
      --radius: 14px;
      --radius-sm: 8px;
    }

    body {
      font-family: 'DM Sans', sans-serif;
      background: var(--background);
      color: var(--blush);
      min-height: 100vh;
      font-size: 15px;
      display: flex;
      flex-direction: column;
    }

    .shell {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2rem 1rem;
      height: calc(100vh - 56px);
    }

    .nav-logo {
      height: 56px;
    }

    .topbar {
      display: none;
      width: 100%;
      background-color: #3b3a3a;
      opacity: 0.7;
      padding: 0 2rem;
      height: 56px;
      align-items: center;
      justify-content: space-between;
      flex-shrink: 0;
      box-shadow: var(--shadow);
    }

    .topbar.visible {
      display: flex;
    }

    .topbar-brand {
      font-family: 'DM Serif Display', serif;
      font-size: 20px;
      color: var(--charcoal);
    }

    .logo {
      width: clamp(300px, 90vw, 500px);
      height: auto;
    }

    .topbar-user {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .topbar-name {
      font-size: 13px;
      color: var(--muted);
    }

    .screen {
      display: none;
      width: clamp(300px, 90vw, 500px);
      animation: up 0.2s ease;
    }

    .screen.dashboard {
      height: calc(100vh - 56px);
    }

    .screen.active {
      display: block;
    }

    @keyframes up {
      from {
        opacity: 0;
        transform: translateY(10px);
      }

      to {
        opacity: 1;
        transform: none;
      }
    }

    #screen-dashboard {
      max-width: 720px;
    }

    .wordmark {
      font-family: 'DM Sans', sans-serif;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      text-align: center;
      margin-bottom: 1.5rem;
    }

    .login-card {
      background: white;
      border-radius: var(--radius);
      padding: 40px;
      box-shadow: var(--shadow-lg);
    }

    .login-title {
      font-family: 'DM Serif Display', serif;
      font-size: 24px;
      text-align: center;
      margin-bottom: 4px;
    }

    .login-sub {
      font-size: 13px;
      color: var(--muted);
      text-align: center;
      margin-bottom: 28px;
      line-height: 1.6;
    }

    .form-row {
      margin-bottom: 16px;
    }

    .form-group {
      margin-bottom: 16px;
    }

    .form-label {
      display: block;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.07em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 6px;
    }

    input[type="password"],
    input[type="text"] {
      width: 100%;
      padding: 10px 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      background: var(--cream);
      color: var(--charcoal);
      outline: none;
      transition: border-color 0.15s;
    }

    input:focus {
      border-color: var(--blush);
    }

    input::placeholder {
      color: var(--muted);
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      height: 42px;
      font-family: 'DM Sans', sans-serif;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      border-radius: var(--radius-sm);
      transition: all 0.15s;
      margin-top: 8px;
      border: none;
    }

    .btn:active {
      transform: scale(0.985);
    }

    .btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }

    .btn-primary {
      background: var(--blush);
      color: white;
    }

    .btn-primary:hover:not(:disabled) {
      background: #C07050;
    }

    .btn-ghost {
      display: inline-flex;
      align-items: center;
      font-family: 'DM Sans', sans-serif;
      font-size: 13px;
      font-weight: 500;
      justify-content: center;
      color: var(--cream);
      background: var(--blush);
      border: none;
      border-radius: var(--radius-sm);
      padding: 12px 12px;
      cursor: pointer;
      transition: all 0.15s;
      width: clamp(300px, 90vw, 500px);
      height: auto;
      margin-top: auto;
      margin-bottom: 2rem;
    }

    .btn-ghost:hover {
      background: var(--blush-light);
      color: var(--charcoal);
      border-color: var(--blush-light);
    }

    .alert {
      padding: 10px 14px;
      border-radius: var(--radius-sm);
      font-size: 13px;
      margin-bottom: 16px;
      display: none;
      line-height: 1.5;
    }

    .alert.show {
      display: block;
    }

    .alert-error {
      background: var(--error-light);
      color: var(--error);
    }

    .alert-success {
      background: var(--sage-light);
      color: #2D6A55;
      border: 1px solid #B0D8C8;
    }

    .spinner {
      width: 14px;
      height: 14px;
      border: 2px solid currentColor;
      border-top-color: transparent;
      border-radius: 50%;
      animation: spin 0.55s linear infinite;
      opacity: 0.7;
      flex-shrink: 0;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    /* Loading overlay on initial fetch */
    .init-overlay {
      position: fixed;
      inset: 0;
      background: var(--cream);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
      z-index: 100;
      transition: opacity 0.3s;
    }

    .init-overlay.hidden {
      opacity: 0;
      pointer-events: none;
    }

    .init-overlay .wordmark {
      margin: 0;
    }

    .init-msg {
      font-size: 13px;
      color: var(--muted);
    }

    /* ── dashboard ── */
    .dash-grid {
      display: flex;
      flex-direction: column;
      gap: 16px;
      margin-bottom: 16px;
      height: calc(100vh - 56px - 2rem);
    }

    @media (max-width: 540px) {
      .dash-grid {
        grid-template-columns: 1fr;
      }
    }

    .panel {
      background: white;
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px 22px;
      box-shadow: var(--shadow);
    }

    .panel-wide {
      grid-column: 1 / -1;
    }

    .panel-label {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
      font-weight: 600;
      margin-bottom: 16px;
    }

    .stat-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .stat {
      background: var(--cream);
      border-radius: var(--radius-sm);
      padding: 14px 16px;
      border: 1px solid var(--border);
    }

    .stat-lbl {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 6px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      font-weight: 600;
    }

    .stat-val {
      font-family: 'DM Serif Display', serif;
      font-size: 28px;
      color: var(--charcoal);
      line-height: 1;
    }

    .stat-unit {
      font-size: 14px;
      color: var(--muted);
      font-family: 'DM Sans', sans-serif;
      font-weight: 400;
    }

    .shift-list {
      list-style: none;
    }

    .shift-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 11px 0;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      gap: 8px;
    }

    .shift-item:last-child {
      border-bottom: none;
    }

    .shift-left {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .shift-date {
      font-weight: 500;
    }

    .shift-time {
      color: var(--muted);
      font-size: 12px;
    }

    .shift-right {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
    }

    .shift-hrs {
      font-size: 12px;
      font-weight: 600;
      color: var(--muted);
      background: var(--cream);
      padding: 2px 10px;
      border-radius: 20px;
      border: 1px solid var(--border);
    }

    .shift-badge {
      font-size: 10px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 20px;
      letter-spacing: 0.04em;
    }

    .badge-approved {
      background: var(--sage-light);
      color: #2D6A55;
    }

    .badge-pending {
      background: #FEF3C7;
      color: #92400E;
    }

    .empty-state {
      text-align: center;
      padding: 2rem 0;
      color: var(--muted);
      font-size: 13px;
    }

    .profile-row {
      display: flex;
      align-items: center;
      gap: 14px;
      margin-bottom: 16px;
    }

    .avatar {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--blush);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 14px;
      flex-shrink: 0;
    }

    .profile-name {
      font-size: 15px;
      font-weight: 500;
    }

    .profile-role {
      font-size: 12px;
      color: var(--muted);
      margin-top: 2px;
    }

    .info-row {
      display: flex;
      justify-content: space-between;
      font-size: 13px;
      padding: 8px 0;
      border-bottom: 1px solid var(--border);
    }

    .info-row:last-child {
      border-bottom: none;
    }

    .info-row .lbl {
      color: var(--muted);
    }

    .info-row .val {
      font-weight: 500;
    }
